package com.zhkjnet.zhyy.bean;

public class JsonResponse {

    private int code = 0;

    private String message;

    private Object data;

    public static JsonResponse success() {
        return new JsonResponse();
    }

    public static JsonResponse success(Object data) {
        JsonResponse jsonResponse = new JsonResponse();
        jsonResponse.data = data;
        return jsonResponse;
    }

    public static JsonResponse error(int code, String message) {
        JsonResponse jsonResponse = new JsonResponse();
        jsonResponse.code = code;
        jsonResponse.message = message;
        return jsonResponse;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
